﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class logout : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        HttpCookie cookiechk = Request.Cookies["Users"];
        if (Session["User"] == null && cookiechk["User"] == null)
        {
            loggedin.Visible = true;
        }
        else
        {
            Session.Abandon();
            HttpCookie cookie = new HttpCookie("Users");
            cookie.Expires = DateTime.Now.AddDays(-1);
            Response.Cookies.Add(cookie);

            loggedout.Visible = true;


        }
    }
}